import { AudioClip, Color, JsonAsset, Prefab, SpriteFrame, Vec3 } from "cc";
import { LevelInfo } from "./GlobaInterface";

/**
 * 游戏全局数据
 */
export class GlobalData {

    //游戏分数
    static GameScore: number = 0;

    //金币数量
    static GameCoin: number = 0;

    //游戏结束
    static GameOver: boolean = false;

    //是否是广告
    static IsAd: boolean = false;

    //当前关卡
    static CurrentLevel: number = 0;

    //发送按钮位置
    static SendPos: Vec3 = new Vec3(0, 0, 0);

    //麻将名称
    static MajiangName: string[] = [

    ]

    //麻将状态
    static MajiangState: string[] = [
        "majiangpeng",
        "mangjiangeat",
        "majianggang"
    ]

    //
    static BodyAddSpeed: number = 0;

    //麻将移动速度
    static MajiangMoveSpeed: number = 50;

}

/**
 * 资源列表
 */
export const GAME_RES = {
    BundleName: "GAME_RES",//资源包名称
    Asset: {//资源列表
        Prefabs: { path: "Prefab", type: Prefab },
        Sounds: { path: "Sound", type: AudioClip },
        SpriteFrames: { path: "SpriteFrame", type: SpriteFrame },
        Jsons: { path: "Json", type: JsonAsset }
    }
}

/**
 * 游戏预设体
 */
export const GAME_PREFAB = {
    ClearMajiang: "ClearMajiang"
}

/**
 * 游戏场景
 */
export const GAME_SCENE = {
    LoginScene: "LoginScene",
    ZumaGame: "ZumaGame"
}

/**
 * 游戏弹窗
 */
export const GAME_POP = {
    PopSet: "PopSet",
    PopSkin: "PopSkin",
    PopAd: "PopAd",
    PopEnd: "PopEnd",
    PopBuy: 'PopBuy',
    PopStart: 'PopStart',
    PopCollect: "PopCollect",
    PopLevel: "PopLevel",
    PopPass: "PopPass"
}

/**
 * 游戏顶层弹窗
 */
export const GAME_TOP = {
    TopPromptText: 'TopPromptText'
}

/**
 * 音效分类
 */
export const SOUND_TYPE = {
    Button: "anniu",
    Bg: "music",
    Wrong: "wrong",
    Boom: "boomsound",
    Success: "success"
}

/**
 * 游戏纹理
 */
export const GAME_SPRITEFRAME = {
    Majiang: "majiang_tong"
}


